<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
	<th:block th:include="include/include :: header('定时任务列表')" />
</head>
<body class="gray-bg">
	<div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="job-form">
					<div class="select-list">
						<ul>
							<li>
								任务名称：<input type="text" name="jobName"/>
							</li>
							<li>
								任务分组：<input type="text" name="jobGroup"/>
							</li>
							<li>
								任务状态：<select name="jobStatus" th:with="type=${@dict.getType('job_status')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.label}" th:value="${dict.value}"></option>
								</select>
							</li>
							<li>
								执行状态：<select name="jobExecuteStatus" th:with="type=${@dict.getType('job_execute_status')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.label}" th:value="${dict.value}"></option>
								</select>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
			<div class="btn-group-sm" id="toolbar" role="group">
				<a class="btn btn-success" onclick="$.operate.add()" sec:authorize="hasAuthority('job_sys_job_add')">
	                <i class="fa fa-plus"></i> 新增
	            </a>	            
				<a class="btn btn-primary" onclick="startAllJob()" sec:authorize="hasAuthority('job_sys_job_start_job')">
		            <i class="fa fa-edit"></i> 启动全部任务
		        </a>
		        <a class="btn btn-danger" onclick="shutdownAllJob()" sec:authorize="hasAuthority('job_sys_job_shutdown_job')">
		            <i class="fa fa-remove"></i> 暂停全部任务
		        </a>
		        <!-- <a class="btn btn-warning" onclick="refreshJob()" sec:authorize="hasAuthority('job_sys_job_refresh_job')">
		            <i class="fa fa-download"></i> 重置全部任务
		        </a> -->
		        <a class="btn btn-info" onclick="jobLog()">
		            <i class="fa fa-list"></i> 日志
		        </a>
	        </div>
        
	        <div class="col-sm-12 select-table table-striped">
			    <table id="bootstrap-table"></table>
			</div>
		</div>
	</div>
	<th:block th:include="include/include :: footer" />
	<script th:inline="javascript">
		/*<![CDATA[*/
			var editFlag = [[${@permission.hasPermi('job_sys_job_edit')}]];
			var deleteFlag = [[${@permission.hasPermi('job_sys_job_del')}]];
			var executeFlag = [[${@permission.hasPermi('job_sys_job_run_job')}]];
			var startFlag = [[${@permission.hasPermi('job_sys_job_start_job')}]];
			var shutdownFlag = [[${@permission.hasPermi('job_sys_job_shutdown_job')}]];
			var statusDatas = [[${@dict.getType('job_status')}]];
			var executeDatas = [[${@dict.getType('job_execute_status')}]];
			var typeDatas = [[${@dict.getType('job_type')}]];
			var policyeDatas = [[${@dict.getType('misfire_policy')}]];
		/*]]>*/
	</script>
	<script th:src="@{/pages/monitor/job/jobList.js}"></script>
</body>
</html>